package top.anydata.lifeofcode.lifesystem.conf;

import lombok.Getter;

/**
 * 功能描述:
 *
 * @author <a href="mailto:caingao@anydata.top">CainGao</a>
 * @version V_1.0
 * @date 2023/5/15 8:12 PM
 */
public enum RestResultEnum {

    // 1xx Informational    1xx信息类的继续
    CONTINUE(100, "Continue"),
    //交换协议
    SWITCHING_PROTOCOLS(101, "Switching Protocols"),
    //正在处理中
    PROCESSING(102, "Processing"),
    CHECKPOINT(103, "Checkpoint"),
    //重新登录
    ERR_TOKEN(301,"登录失效,请重新登录"),

    OK(200,"OK"),
    //创建
    CREATED(201, "Created"),
    USER_ACCESS_DENIED(301,"用户访问受限!"),
    // 用户不存在
    USER_NOF_FOUND(2001,"用户不存在!"),

    USER_IN_USED(2007,"用户已存在!"),
    // 用户名或密码错误
    PWD_IS_ERROR(2002,"用户密码错误!"),

    // 邀请码错误
    INVIDE_CODE_ERR(2003,"邀请码错误,请确认邀请码!"),

    INVIDE_CODE_INUSE(2004,"邀请码已使用!"),

    // 验证码错误
    VERI_CODE_ERR(2005,"验证码错误或已超时!"),

    // 缺少必填项
    MISSING_REQUIRED_ITEMS(2006,"缺少必填项"),

    ERROR_REGEX_PHONE_NUM(2007,"手机号格式不正确,请确认!"),

    ERROR_REGEX_MAIL_NUM(2008,"邮箱格式不正确,请确认!"),

    ERROR_DATA(2009,"参数错误!"),

    ERROR_SYS(2010,"系统错误!"),

    //IP 访问次数过多. 访问受限.
    IP_REQUEST_RATE_LIMITED(512,"IP Request Rate Lited "),

    ERROR_DECRYPT(513,"加密错误"),

    NOT_SUPPORT(10001,"not support this!");

    RestResultEnum(){
    }

    RestResultEnum(Integer code, String message){
        this.code=code;
        this.message=message;
    }

    @Getter
    private Integer code;
    @Getter
    private String message;
}
